cmake_minimum_required(VERSION 3.10)
project(RDS)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 添加头文件搜索路径（包含主目录和两个子目录）
include_directories(
    ${PROJECT_SOURCE_DIR}
    ${PROJECT_SOURCE_DIR}/tools/cJSON
    ${PROJECT_SOURCE_DIR}/tools/Settings
)

# 收集所有源文件
set(SOURCES
    main.cpp

    tools/cJSON/cJSON.c
    tools/cJSON/cJSON_Utils.c

    tools/Settings/SettingsParser.cpp
)

# 创建可执行文件
add_executable(${PROJECT_NAME} ${SOURCES})

# 设置输出目录（可选）
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

# 安装目标（可选）
install(TARGETS ${PROJECT_NAME}
    RUNTIME DESTINATION bin
)
